package com.teach.controller.photo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.teach.dto.LoginUser;
import com.teach.service.photo.PhotoCommentsService;
import com.teach.service.photo.PhotoFivService;
import com.teach.service.photo.PhotoGreatService;

import lombok.extern.slf4j.Slf4j;

@RestController()
@RequestMapping("/photo")
@Slf4j
public class PhotoNoticeController {

	@Autowired
	private PhotoGreatService photoGreatService;
	
	@Autowired
	private PhotoFivService photoFivService;
	
	@Autowired
	private PhotoCommentsService photoCommentsService;
	
	@RequestMapping("/great-inform.do")
	public Object greatInform(LoginUser user, @RequestParam(required = false, defaultValue = "1")String status) {
		log.debug("用户：{}，状态：{}", user, status);
		return photoGreatService.greatInform(user, status);
	}

	@RequestMapping("/collect-inform.do")
	public Object collectInform(LoginUser user, @RequestParam(required = false, defaultValue = "1")String status) {
		log.debug("用户：{}，状态：{}", user, status);
		return photoFivService.collectInform(user, status);
	}
	
	@RequestMapping("/comment-inform.do")
	public Object commentInform(LoginUser user) {
		log.debug("用户：{}", user);
		return photoCommentsService.commentInform(user);
	}
}
